const yapiData = {
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number"
    },
    "msg": {
      "type": "string"
    },
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "layerName": {
          "type": "string",
          "description": "图层名称"
        },
        "layerUrl": {
          "type": "string",
          "description": "图层地址"
        },
        "layerType": {
          "type": "string",
          "description": "图层类型"
        },
        "imageId": {
          "type": "null",
          "description": "挂载归档影像id"
        },
        "dataSetId": {
          "type": "null",
          "description": "挂载数据集id"
        },
        "foundTime": {
          "type": "string",
          "description": "新增时间"
        },
        "updatedTime": {
          "type": "null",
          "description": "修改时间"
        },
        "foundId": {
          "type": "string",
          "description": "新增人id"
        },
        "foundName": {
          "type": "string",
          "description": "新增人名称"
        },
        "updatedId": {
          "type": "null",
          "description": "修改人id"
        },
        "updatedName": {
          "type": "null",
          "description": "修改人名称"
        }
      }
    },
    "success": {
      "type": "boolean"
    }
  }
}

const items = yapiData.properties.data.properties

// const outData = {}
// Object.keys(items).forEach(item => {
//   outData[`${item}?`] = items[item].type
// })
// let strData = JSON.stringify(outData).replace(/\"/g, '')


// let strDataList = strData.split(',')
// strDataList.forEach((item,index) => {
//   console.log('items[index]',items);
  
//   item += ` //${items[index]?.description}`
// })
console.log(JSON.stringify(items).replace(/:{\"type\"/g,'').replace(/\"description\":/g,' //').replace(/{|}|\,|\"/g,''))

